Skip to content

Commit

Permalink
dox.yml: fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Sep 2, 2024
1 parent 2a7f1c0 commit 4ea20ed
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 15 deletions.
35 changes: 25 additions & 10 deletions .github/workflows/dox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ jobs:

- name: Check out RedisX
uses: actions/checkout@v4
with:
path: redisx
with:
repository: Smithsonian/redisx
path: redisx

- name: Check out xchange
uses: actions/checkout@v4
Expand All @@ -46,7 +47,6 @@ jobs:

site-update:
name: Update github pages
working-directory: ./redisx
needs: apidocs
if: github.repository_owner == 'Smithsonian' && (github.event_name == 'release' || contains(github.event.head_commit.message, 'site update'))

Expand All @@ -55,13 +55,29 @@ jobs:

- name: Checkout source
uses: actions/checkout@v4
repository: Smithsonian/redisx
path: redisx

- name: Check out xchange
uses: actions/checkout@v4
with:
repository: Smithsonian/xchange
path: xchange

- name: Generate headless README
run: make README-orig.md
run: make -C redisx README-orig.md

- name: Generate xchange apidocs
uses: mattnotmitt/[email protected]
with:
additional-packages: font-roboto
working-directory: ./xchange

- uses: mattnotmitt/[email protected]
- name: Generate RedisX apidocs
uses: mattnotmitt/[email protected]
with:
additional-packages: font-roboto
working-directory: ./redisx

- name: Checkout gh-pages
uses: actions/checkout@v4
Expand All @@ -74,15 +90,15 @@ jobs:

- name: Copy README
run: |
echo '<img src="/xchange/resources/CfA-logo.png" alt="CfA logo" width="400" height="67" align="right">' > site/doc/README.md
echo '<img src="/redisx/resources/CfA-logo.png" alt="CfA logo" width="400" height="67" align="right">' > site/doc/README.md
echo '<br clear="all">' >> site/doc/README.md
cat README-orig.md >> site/doc/README.md
cat redisx/README-orig.md >> site/doc/README.md
- name: Copy CHANGELOG
run: cp CHANGELOG.md site/doc/
run: cp redisx/CHANGELOG.md site/doc/

- name: Copy API documentation
run: cp -a apidoc site/
run: cp -a redisx/apidoc site/

- name: Push to pages
run: |
Expand All @@ -95,7 +111,6 @@ jobs:
changelog-update:
name: Update CHANGELOG on github pages
working-directory: ./redisx
if: github.repository_owner == 'Smithsonian' && contains(github.event.head_commit.message, 'changelog update')

runs-on: ubuntu-latest
Expand Down
36 changes: 31 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ A simple, light-weight C/C++ Redis client.
## Table of Contents

- [Introduction](#introduction)
- [Pre-requisites](#pre-requisites)
- [Buildding RedisX](#building-redisx)
- [Managing Redis server connetions](#managing-redis-server-connections)
- [Prerequisites](#prerequisites)
- [Building RedisX](#building-redisx)
- [Managing Redis server connections](#managing-redis-server-connections)
- [Simple Redis queries](#simple-redis-queries)
- [Atomic execution blocks and LUA scripts](#atomic-transaction-blocks-and-lua-scripts)
- [Publish/subscribe (PUB/SUB) support](#publish-subscribe-support)
Expand Down Expand Up @@ -58,8 +58,8 @@ There are no official releases of __RedisX__ yet. An initial 1.0.0 release is ex

-----------------------------------------------------------------------------

<a name="pre-requisites"></a>
## Pre-requisites
<a name="prerequisites"></a>
## Prerequisites

The [Smithsonian/xchange](https://github.com/Smithsonian/xchange) library is both a build and a runtime dependency of
RedisX.
Expand Down Expand Up @@ -360,6 +360,7 @@ with the approrpiate mutex locked to prevent concurrency issues.
// other requests concurrently...
redisxLockEnabled(pipe);
// -------------------------------------------------------------------------
// Submit a whole bunch of asynchronous requests, e.g. from a loop...
for (...) {
int status = redisxSendRequestAsync(pipe, ...);
Expand All @@ -374,6 +375,7 @@ with the approrpiate mutex locked to prevent concurrency issues.
...
}
}
// -------------------------------------------------------------------------
// Release the exclusive lock on the pipeline channel, so
// other threads may use it now that we sent off our requests...
Expand Down Expand Up @@ -693,11 +695,35 @@ subscriber function as appropriate (provided no other subscription needs it) via
<a name="error-handling"></a>
## Error handling
Error handling of RedisX is an extension of that of __xchange__, with further error codes defined in `redisx.h`.
The RedisX functions that return an error status (either directly, or into the integer designated by a pointer
argument), can be inspected by `redisxErrorDescription()`, e.g.:
```c
Redis *redis ...
int status = redisxSetValue(...);
if (status != X_SUCCESS) {
// Ooops, something went wrong...
fprintf(stderr, "WARNING! set value: %s", redisErrorDescription(status));
...
}
```


-----------------------------------------------------------------------------

<a name="debug-support"></a>
## Debug support

The __xchange__ library provides two macros: `xvprintf()` and `xdprintf()`, for printing verbose and debug messages
to `stderr`. Both work just like `printf()`, but they are conditional on verbosity being enabled via
`xSetVerbose(boolean)` and the global variable `xDebug` being `TRUE` (non-zero), respectively. Applications using
__xchange__ may use these macros to produce their own verbose and/or debugging outputs conditional on the same global
settings.

You can also turn debug messages by defining the `DEBUG` constant for the compiler, e.g. by adding `-DDEBUG` to
`CFLAGS` prior to calling `make`.

-----------------------------------------------------------------------------

<a name="future-plans"></a>
Expand Down

0 comments on commit 4ea20ed

Please sign in to comment.