Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
E
esi-table-data
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esi-data-scrapping
esi-table-data
Commits
29abd37e
Commit
29abd37e
authored
Jul 13, 2017
by
Vasyl Bodnaruk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete functions that are not using
parent
5c88a5a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
15 deletions
+0
-15
periodic_task_creator.py
esi/scraper/periodic_task_creator.py
+0
-14
service.py
esi/scraper/service.py
+0
-1
No files found.
esi/scraper/periodic_task_creator.py
View file @
29abd37e
...
...
@@ -2,20 +2,6 @@ from __future__ import absolute_import
from
django_celery_beat.models
import
PeriodicTask
,
CrontabSchedule
def
make_data
(
data
):
every
=
(
lambda
x
:
'*/{}'
.
format
(
x
))
result
=
{
'minute'
:
data
.
get
(
'minute'
,
0
),
'hour'
:
data
.
get
(
'hour'
,
0
),
'day_of_week'
:
'*'
,
'day_of_month'
:
data
.
get
(
'day_of_month'
,
'*'
),
'month_of_year'
:
data
.
get
(
'month_of_year'
,
'*'
)
}
if
data
.
get
(
'every'
):
result
=
{
k
:
every
(
v
)
for
k
,
v
in
result
.
items
()
if
k
not
in
(
'minute'
,
'hour'
)}
return
result
def
make_periodic_task
(
job_id
,
data
):
schedule
,
_
=
CrontabSchedule
.
objects
.
get_or_create
(
**
data
)
task
=
PeriodicTask
.
objects
.
create
(
...
...
esi/scraper/service.py
View file @
29abd37e
from
datetime
import
datetime
import
io
from
urllib.request
import
urlopen
from
scrapyd_api
import
ScrapydAPI
from
.models
import
Job
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment