Skip to content
This repository has been archived by the owner on Jan 8, 2021. It is now read-only.

weather panel #292

Merged
merged 36 commits into from
Oct 6, 2012
Merged

weather panel #292

merged 36 commits into from
Oct 6, 2012

Conversation

dcrystalj
Copy link
Contributor

@dcrystalj
Copy link
Contributor Author

please take a look

latitude = mongoengine.DecimalField()
longitude = mongoengine.DecimalField()
model_name = mongoengine.StringField()
meta = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty line before this.

@dcrystalj
Copy link
Contributor Author

please take a look

)
else:
models.Precipitation.objects(
created=datetime.strptime(weather_object.attrib['created'], "%Y-%m-%dT%H:%M:%SZ"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Constant string. You should use '.

@mitar
Copy link
Member

mitar commented Oct 2, 2012

Please update from main repository.

@mitar
Copy link
Member

mitar commented Oct 2, 2012

We had to change way periodic tasks are run because they were piling up. Sorry for additional work. So now we do not define periodic tasks in settings.py anymore.


latitude = self.request.node.latitude
longitude = self.request.node.longitude
#TODO: Check and possibly optimize
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We put space before TODO keyword.

@mitar
Copy link
Member

mitar commented Oct 2, 2012

Otherwise it is great now! Super!

@dcrystalj
Copy link
Contributor Author

bump

# Fetching data only once per possible duplicate locations
for latitude, longitude in {(node.latitude, node.longitude) for node in nodes.get_all_nodes()}:
weather_tasks.append(update_weather.s(latitude, longitude))
return celery.group(weather_tasks)()@task.task(rate_limit=20) # 20 tasks per second. Limitation by the api http://api.yr.no/conditions_service.html
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line has invalid syntax.

You can see that by tests which have also failed because of this (GitHub is showing them just bellow the pull request description).

@mitar
Copy link
Member

mitar commented Oct 6, 2012

Otherwise it looks good. But we should be doing tests too. Check how I made tests for horoscope. You can make them, or open a ticket for them. You have done a lot already.

@dcrystalj
Copy link
Contributor Author

updated, still some bug in test(frozen) but i think it's not a problem in code

mitar added a commit that referenced this pull request Oct 6, 2012
@mitar mitar merged commit 13f583d into wlanslovenija:master Oct 6, 2012
@mitar
Copy link
Member

mitar commented Oct 6, 2012

Merged. Tests to be done with #326.

@mitar
Copy link
Member

mitar commented Oct 6, 2012

It seems tests are still failing, there is still bug in the code. Grr. You should really try your code before pushing!

https://travis-ci.org/#!/wlanslovenija/PiplMesh/builds/2686585

@dcrystalj
Copy link
Contributor Author

maybe you haven't seen my comment e6c6182
i have problems again to run/install requirements

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants