File: //home/arjun/projects/env/lib/python3.10/site-packages/boto/manage/__pycache__/task.cpython-310.pyc
o
we} � @ sx d dl Z d dlmZmZmZ d dlmZ d dlZd dlZd dl Z d dl
mZ dd� ZG dd� de�Z
G d d
� d
e�ZdS )� N)�StringProperty�DateTimeProperty�IntegerProperty)�Model)�StringIOc C s, | dkrd S t | �dk st | �dkrt�d S )N�*r � )�int�
ValueError)�val� r �I/home/arjun/projects/env/lib/python3.10/site-packages/boto/manage/task.py�
check_hour s
�r c s� e Zd ZdZe� Zededd�Zedd�Ze � Z
e� Ze� Z
e� Zedd� �Zd� fd d
� Zdd� Zd
d� Zddd�Zdd� Z� ZS )�Taska�
A scheduled, repeating task that can be executed by any participating servers.
The scheduling is similar to cron jobs. Each task has an hour attribute.
The allowable values for hour are [0-23|*].
To keep the operation reasonably efficient and not cause excessive polling,
the minimum granularity of a Task is hourly. Some examples:
hour='*' - the task would be executed each hour
hour='3' - the task would be executed at 3AM GMT each day.
Tr )�required� validator�default)r c C s | � � D ]}|�|� qd S �N)�all�start)�cls�
queue_name�taskr r r
� start_all9 s �zTask.start_allNc s@ t t| �j|fi |�� | jdk| _| jdk| _tj�� | _d S )Nr ) �superr �__init__�hour�hourly�daily�datetime�utcnow�now)�self�id�kw�� __class__r r
r >