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

Use SolidQueue to run a cron job repopulating Location and Observation center_lat/center_lng #2641

Merged
merged 9 commits into from
Jan 10, 2025

Conversation

nimmolo
Copy link
Contributor

@nimmolo nimmolo commented Jan 6, 2025

Not sure if this config is phrased right, need to do more research. But apparently that's all this takes: a config and a command. Update: yes, it is that simple.

Also, I'm not sure we need to run it weekly. Monthly might be A-OK. There was some question initially about whether our callbacks would populate these correctly... we should check how many are currently missing in the db.

Responds to #2640

@coveralls
Copy link
Collaborator

coveralls commented Jan 6, 2025

Coverage Status

coverage: 93.513% (+0.004%) from 93.509%
when pulling 384a1bd on nimmo-recurring-cron
into de8ef68 on main.

@nimmolo
Copy link
Contributor Author

nimmolo commented Jan 6, 2025

@JoeCohen @mo-nathan
We could run this job silently as I initially set it up, but now it occurs to me, we'd probably want a real job that counts what it's updating and logs a report, right?

@JoeCohen
Copy link
Member

JoeCohen commented Jan 6, 2025 via email

@nimmolo
Copy link
Contributor Author

nimmolo commented Jan 6, 2025

I don't think it's something that we would review, it's that we'd want a log to know what's been happening in case something went awry.

These columns are the key to our being able to switch from obs locations as boxes to obs locations as the center points of boxes that are under a given threshold. Once we're displaying locations like that, we are going to want to know what's happening with these columns.

@nimmolo
Copy link
Contributor Author

nimmolo commented Jan 6, 2025

Turns out we have ~7876 observations that need updating from this job currently. I guess it should run weekly, if not daily.

@nimmolo nimmolo marked this pull request as ready for review January 10, 2025 07:00
@nimmolo
Copy link
Contributor Author

nimmolo commented Jan 10, 2025

Considering how many obs need updating since our original migration (>20 per day, i'm estimating), and the fact that people will probably want to find recent obs reflected on maps, i've changed the frequency of this job to "nightly".

@nimmolo nimmolo merged commit ffe6866 into main Jan 10, 2025
6 checks passed
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.

3 participants