Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add the ingest_community_events_calender cronjob #7536

Merged
merged 9 commits into from
Oct 4, 2020

Conversation

hhio618
Copy link
Contributor

@hhio618 hhio618 commented Sep 25, 2020

Description
  • Add a cron job to ingest Gitcoin Community events calendar into the marketing.models.upcomingdate model.
  • Add the ingest_community_events_calender management command with a url argument set default to this iCal link).
Refers/Fixes

Fixes: #7499

migrations.AddField(
model_name='upcomingdate',
name='last_modified',
field=models.DateTimeField(db_index=True, default=datetime.datetime(2020, 9, 25, 9, 44, 19, 299543)),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure about the default value to populate existing records!

@owocki
Copy link
Contributor

owocki commented Sep 25, 2020

cdoe seems fairly sane to me; how did you test this?

@hhio618
Copy link
Contributor Author

hhio618 commented Sep 26, 2020

Hi @owocki, I have some ideas for test cases. Do we need any particular testes here?
I'll add another commit to the pr.

@owocki
Copy link
Contributor

owocki commented Sep 29, 2020

92 events are created
0 events are updated
35 events are skipped
DONE
root@48b5e4512227:/code/app# ./manage.py ingest_community_events_calender
/usr/local/lib/python3.6/dist-packages/sorl/thumbnail/conf/__init__.py:16: RemovedInDjango30Warning: The DEFAULT_CONTENT_TYPE setting is deprecated.
  setattr(self, attr, getattr(obj, attr))
System check identified some issues:

WARNINGS:
?: (debug_toolbar.W001) debug_toolbar.middleware.DebugToolbarMiddleware is missing from MIDDLEWARE.
	HINT: Add debug_toolbar.middleware.DebugToolbarMiddleware to MIDDLEWARE.
marketing.UpcomingDate.last_modified: (fields.W161) Fixed default value provided.
	HINT: It seems you set a fixed date / time / datetime value as default for this field. This may not be what you want. If you want to have the current date as default, use `django.utils.timezone.now`
0 events are created
0 events are updated
127 events are skipped

amazing! LGTM

@thelostone-mc thelostone-mc merged commit 6e06ae3 into gitcoinco:master Oct 4, 2020
@danlipert
Copy link
Contributor

Hey @hhio618 - looks like the tests were either failing when we merged this PR in, or started failing shortly thereafter. Can you take a look at the tests I removed here and see whats up? Thanks! #7727

@hhio618
Copy link
Contributor Author

hhio618 commented Oct 22, 2020

@danlipert No worries, I'll check it out.

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

Successfully merging this pull request may close these issues.

Write a cron job to ingest Gitcoin Community events calendar into the marketing.models.upcomingdate model
4 participants