Comments (5)
You should cron send_queued_mail
management command instead of calling send_queued_mail
directly.
python manage.py send_queued_mail
from django-post_office.
Normally I would, but Heroku doesn't support cron jobs.
from django-post_office.
This may not be the most up to date of instructions, but you can try something like this: http://guidovanoorschot.nl/adding-cron-jobs-to-a-django-project-with-heroku-scheduler/
Sent from my phone
On Jan 30, 2014, at 10:04 PM, ldm616 [email protected] wrote:
Normally I would, but Heroku doesn't support cron jobs.
—
Reply to this email directly or view it on GitHub.
from django-post_office.
Thanks. Scheduler works - but the max frequency is once every 5 mins. I
need once every minute.
My pseudo cron job on Heroku using apscheduler works, but it seems to open
a new database connection each time it runs and starts to max out my
connections. I've tried using a database pooler, but that doesn't help.
On Thu, Jan 30, 2014 at 6:22 AM, Selwin Ong [email protected]:
This may not be the most up to date of instructions, but you can try
something like this:
http://guidovanoorschot.nl/adding-cron-jobs-to-a-django-project-with-heroku-scheduler/Sent from my phone
On Jan 30, 2014, at 10:04 PM, ldm616 [email protected] wrote:
Normally I would, but Heroku doesn't support cron jobs.
Reply to this email directly or view it on GitHub.
Reply to this email directly or view it on GitHubhttps://github.com//issues/45#issuecomment-33691461
.
from django-post_office.
SOLVED.
I read somewhere that Django doesn't close db connections after running management commands. I tweaked my pseudo cron job as follows to explicitly close the db connection after send_queued_mail runs.
...
from django.core.management import call_command
from django import db
@sched.interval_schedule(minutes=1)
def timed_job():
call_command('send_queued_mail')
db.close_connection()
...
from django-post_office.
Related Issues (20)
- Post-office raise 2 same error when there are SMTP connection error HOT 1
- dictionary update sequence element #0 has length 1; 2 is required
- Authorisation fails for Office 365 with new default policies in place HOT 4
- Commit aa1617e creates issues when creating a new email where context is also set. HOT 2
- Mocking email template for tests
- Bleach is deprecated as of 2023-01-23 HOT 1
- Can Templates include sub-Templates? For example, consistent signature/unsubscribe footers HOT 1
- Suggestion: Minimal support for implementing retention policies HOT 1
- Spanish translations
- Create New Email From Django Admin HOT 3
- insanely hard to edit default content for a template HOT 3
- MySQLdb.NotSupportedError
- Is this a correct field rendering in email template?
- Multiple instances on the same server HOT 4
- MAX_RETRIES and RETRY_INTERVAL issue HOT 1
- Email Is not being sent
- Send email with inline images asynchronously
- Attach in template
- disk space usage by duplicate attachments
- allow using non-disk attachment storage
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-post_office.