ArqQueueStatsEvent#

pydantic model safir.metrics.arq.ArqQueueStatsEvent#

Statistics for an Arq queue.

Parameters:

data (Any)

Fields:
field num_queued: int [Required]#

The number of jobs that are currently in the queue.

field queue: str [Required]#

The queue that these stats apply to.

classmethod avro_schema(case_type=None, **kwargs)#
Parameters:

case_type (str | None, default: None)

Return type:

str

classmethod avro_schema_to_python(parent=None, case_type=None)#
Parameters:
  • parent (Type[AvroModel] | None, default: None)

  • case_type (str | None, default: None)

Return type:

Dict[str, Any]

classmethod deserialize(data, serialization_type='avro', create_instance=True, writer_schema=None)#
Overloads:
  • cls (Type[TSelf]), data (bytes), serialization_type (serialization.SerializationType), create_instance (Literal[True]), writer_schema (Optional[Union[JsonDict, Type[‘AvroModel’]]]) → TSelf

  • cls (Type[TSelf]), data (bytes), serialization_type (serialization.SerializationType), create_instance (Literal[False]), writer_schema (Optional[Union[JsonDict, Type[‘AvroModel’]]]) → JsonDict

  • cls (Type[TSelf]), data (bytes), serialization_type (serialization.SerializationType), create_instance (bool), writer_schema (Optional[Union[JsonDict, Type[‘AvroModel’]]]) → Union[TSelf, JsonDict]

classmethod deserialize_to_python(data, serialization_type='avro', writer_schema=None)#
Parameters:
  • data (bytes)

  • serialization_type (Literal['avro', 'avro-json'], default: 'avro')

  • writer_schema (Dict[str, Any] | Type[AvroModel] | None, default: None)

Return type:

dict

classmethod fake(**data)#

Creates a fake instance of the model.

Attributes:

data: Dict[str, Any] represent the user values to use in the instance

Parameters:

data (Any)

Return type:

AvroBaseModel

classmethod generate_schema(schema_type='avro')#
Parameters:

schema_type (Literal['avro', 'avro-json'], default: 'avro')

Return type:

OrderedDict | None

classmethod get_fields()#
Return type:

List[FieldProtocol]

classmethod get_fullname()#

Fullname is composed of two parts: a name and a namespace separated by a dot. A namespace is a dot-separated sequence of such names. The empty string may also be used as a namespace to indicate the null namespace. Equality of names (including field names and enum symbols) as well as fullnames is case-sensitive.

Return type:

str

classmethod json_schema(*args, **kwargs)#
Parameters:
Return type:

str

classmethod validate_structure()#

Do runtime validation of fields.

Make sure all of the fields are compatible with the backing datastore (InfluxDB at the moment).

Return type:

None

asdict()#

Returns this model in dictionary form. This method differs from pydantic’s dict by converting all values to their Avro representation. It also doesn’t provide the exclude, include, by_alias, etc. parameters that dict provides.

Return type:

Dict[str, Any]

serialize(serialization_type='avro')#

Overrides the base AvroModel’s serialize method to inject this class’s standardization factory method

Parameters:

serialization_type (Literal['avro', 'avro-json'], default: 'avro')

Return type:

bytes

to_dict()#
Return type:

Dict[str, Any]

to_json(**kwargs)#
Parameters:

kwargs (Any)

Return type:

str

validate_avro()#

Validate that instance matches the avro schema

Return type:

bool