Trigger build

This commit is contained in:
Dominik Werder
2023-09-06 14:25:02 +02:00
parent 8e7567008f
commit 76915d5d82
4 changed files with 28 additions and 13 deletions

View File

@@ -99,10 +99,17 @@ jobs:
# id: daqingest_version_set
# working-directory: ${{steps.wdset.outputs.gh}}/build/daqingest/target/release
- run: "echo 'version: [${{steps.daqingest_version_set.outputs.daqingest_version}}]'"
- run: "mkdir daqingest-${{steps.daqingest_version_set.outputs.daqingest_version}}"
- run: "cp ${{steps.wdset.outputs.gh}}/build/daqingest/target/release/daqingest daqingest-${{steps.daqingest_version_set.outputs.daqingest_version}}/daqingest"
- run: "tar -czf daqingest-${{steps.daqingest_version_set.outputs.daqingest_version}}.tar.gz daqingest-${{steps.daqingest_version_set.outputs.daqingest_version}}"
- uses: actions/upload-artifact@v3
with:
name: daqingest-${{steps.daqingest_version_set.outputs.daqingest_version}}
path: ${{steps.wdset.outputs.gh}}/build/daqingest/target/release/daqingest
- uses: actions/upload-artifact@v3
with:
name: daqingest-${{steps.daqingest_version_set.outputs.daqingest_version}}.tar.gz
path: daqingest-${{steps.daqingest_version_set.outputs.daqingest_version}}.tar.gz
- run: echo "{\"tag_name\":\"buildaction\", \"name\":\"daqingest-${{steps.daqingest_version_set.outputs.daqingest_version}}\", \"draft\":true, \"prerelease\":true}" > create-rel.json
- run: "curl -v -o rel.json -L -X POST -H content-type:application/json -H 'accept:application/vnd.github+json' -H 'authorization:bearer ${{secrets.github_token}}' -H 'x-github-api-version: 2022-11-28' -T create-rel.json https://api.github.com/repos/paulscherrerinstitute/daqingest/releases"
- run: cat rel.json

View File

@@ -1,6 +1,6 @@
[package]
name = "daqingest"
version = "0.2.0-alpha.0"
version = "0.2.0-alpha.1"
authors = ["Dominik Werder <dominik.werder@gmail.com>"]
edition = "2021"

View File

@@ -669,24 +669,14 @@ impl Daemon {
async fn check_caconn_chans(&mut self) -> Result<(), Error> {
if self.caconn_last_channel_check.elapsed() > CHANNEL_CHECK_INTERVAL {
debug!("Issue channel check to all CaConn");
todo!();
// self.ingest_commons
// .ca_conn_set
// .enqueue_command_to_all(|| ConnCommand::check_health())
// .await?;
self.connset_ctrl.check_health().await?;
self.caconn_last_channel_check = Instant::now();
}
Ok(())
}
async fn ca_conn_send_shutdown(&mut self) -> Result<(), Error> {
warn!("send shutdown to all ca connections");
todo!();
// self.ingest_commons
// .ca_conn_set
// .enqueue_command_to_all(|| ConnCommand::shutdown())
// .await?;
self.connset_ctrl.shutdown().await?;
Ok(())
}

View File

@@ -53,6 +53,7 @@ pub struct ChannelAdd {
#[derive(Debug)]
pub enum ConnSetCmd {
ChannelAdd(ChannelAdd),
CheckHealth,
Shutdown,
}
@@ -87,6 +88,18 @@ impl CaConnSetCtrl {
self.tx.send(CaConnSetEvent::ConnSetCmd(cmd)).await?;
Ok(())
}
pub async fn shutdown(&self) -> Result<(), Error> {
let cmd = ConnSetCmd::Shutdown;
self.tx.send(CaConnSetEvent::ConnSetCmd(cmd)).await?;
Ok(())
}
pub async fn check_health(&self) -> Result<(), Error> {
let cmd = ConnSetCmd::CheckHealth;
self.tx.send(CaConnSetEvent::ConnSetCmd(cmd)).await?;
Ok(())
}
}
pub struct CaConnSet {
@@ -138,7 +151,12 @@ impl CaConnSet {
match ev {
CaConnSetEvent::ConnSetCmd(cmd) => match cmd {
ConnSetCmd::ChannelAdd(x) => self.add_channel_to_addr(x).await,
ConnSetCmd::CheckHealth => {
error!("TODO implement check health");
Ok(())
}
ConnSetCmd::Shutdown => {
debug!("shutdown received");
self.shutdown = true;
Ok(())
}