Lines Matching defs:shard
31 Autotest shard client
33 The shard client can be run as standalone service. It periodically polls the
37 A shard is set up (by a human) and pointed to the global AFE (cautotest).
38 On the shard, this script periodically makes so called heartbeat requests to the
41 1. Find the previously created (with atest) record for the shard. Shards are
49 3. Find labels that have been assigned to this shard.
72 2. monitor_db on the shard will pick up these jobs and schedule them on the
78 - the shard_id will be set back to the shard's id, so the record won't be
178 job_models.update(shard=None)
185 def shard(self):
186 """Return this shard's own shard object, fetched from the database.
188 A shard's object is fetched from the master with the first jobs. It will
191 @returns: The shard object if it already exists, otherwise None
195 self._shard = models.Shard.smart_get(self.hostname)
196 except models.Shard.DoesNotExist:
197 # This might happen before any jobs are assigned to this shard.
205 # The scheduler sets shard to None upon completion of the job.
206 # For more information on the shard field's semantic see
207 # models.Job.shard. We need to be careful to wait for both the
211 shard=None,
220 # self.shard might be None if no jobs were downloaded yet.
223 models.Job.objects.filter(pk__in=job_ids).update(shard=self.shard)
237 shard and therefore don't need to be sent again.
325 """Performs all tasks the shard clients needs to do periodically."""
337 """Stops the shard client after the current tick."""
348 """Read the hostname the local shard from the global configuration.
350 Raise an exception if run from elsewhere than a shard.
353 elsewhere than from a shard.
356 'SHARD', 'shard_hostname', default=None)
359 'To run the shard client, shard_hostname must neither be None nor '
367 'SHARD', 'heartbeat_pause_sec', type=float)
371 """Instantiate a shard client instance.
375 @returns A shard client instance.
398 parser = argparse.ArgumentParser(description='Shard client.')
409 logging.info("Starting shard client.")