Navigation | Overlay |
---|---|
t Navigate files | h Toggle hits |
y Change url to tip of branch | m Toggle misses |
b / v Jump to prev/next hit line | p Toggle partial |
z / x Jump to prev/next missed or partial line | 1..9 Toggle flags |
shift + o Open current page in GitHub | a Toggle all on |
/ or ? Show keyboard shortcuts dialog | c Toggle context lines or commits |
1 | 3 |
from django.core.management.base import BaseCommand |
2 | 3 |
from django.core.management import call_command |
3 | 3 |
from crum import impersonate |
4 | 3 |
from django.contrib.auth import get_user_model |
5 | 3 |
from cyborgbackup.main import consumers |
6 |
|
|
7 |
|
|
8 | 3 |
class Command(BaseCommand): |
9 |
"""Create preloaded data, intended for new installs
|
|
10 |
"""
|
|
11 | 3 |
help = 'Creates a preload tower data iff there is none.' |
12 |
|
|
13 | 3 |
def handle(self, *args, **kwargs): |
14 |
consumers.emit_channel_notification("jobs-status_changed", { |
|
15 |
"job_id": 38631, |
|
16 |
"status": "successful", |
|
17 |
"job_name": "Backup Job Backup mail from Knet", |
|
18 |
"group_name": "jobs" |
|
19 |
})
|
|
20 |
consumers.emit_channel_notification("jobs-status_changed", { |
|
21 |
"job_id": 38631, |
|
22 |
"status": "failed", |
|
23 |
"job_name": "Backup Job Backup mail from Knet", |
|
24 |
"group_name": "jobs" |
|
25 |
})
|
|
26 |
consumers.emit_channel_notification("jobs-status_changed", { |
|
27 |
"job_id": 38631, |
|
28 |
"status": "running", |
|
29 |
"job_name": "Backup Job Backup mail from Knet", |
|
30 |
"group_name": "jobs" |
|
31 |
})
|
Read our documentation on viewing source code .